AUX_SOURCE_DIRECTORY(. SRC)
ADD_EXECUTABLE(rwmutex ${SRC})

IF (GLOBAL AND LOCK)
	TARGET_LINK_LIBRARIES(rwmutex ${GLOBAL} ${LOCK})
	INSTALL(TARGETS rwmutex RUNTIME DESTINATION bin)
ELSE (GLOBAL AND LOCK)
	IF (NOT GLOBAL)
		MESSAGE("can't find libTimepassGlobal.so")
	ENDIF (NOT GLOBAL)

	IF (NOT LOCK)
		MESSAGE("can't find libTimepassLock.so")
	ENDIF (NOT LOCK)
ENDIF (GLOBAL AND LOCK)